package {
	import command.CmdGarageOpen;
	import command.CmdLightOn;
	import flash.display.Sprite;
	import flash.events.Event;
	import invoker.SimpleRemoteCtrl;
	import receiver.GarageDoor;
	import receiver.Light;
	
	/**
	 * ...
	 * @author wibrst@qq.com
	 */
	public class DoSimpleCtrl extends Sprite {
		
		public function DoSimpleCtrl():void {
			var simpleCtrl:SimpleRemoteCtrl = new SimpleRemoteCtrl;
			
			var light:Light = new Light( "Living room" );		
			var cmdLightOn:CmdLightOn = new CmdLightOn( light );
			
			simpleCtrl.setCmd( cmdLightOn );
			simpleCtrl.btnPressed();
			
			var garageDoor:GarageDoor = new GarageDoor;
			var cmdGarageOpen:CmdGarageOpen = new CmdGarageOpen( garageDoor );
			
			simpleCtrl.setCmd( cmdGarageOpen );
			simpleCtrl.btnPressed();
		}
		
	}
	
}